package com.novel.entiy;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author tanghao
 * @date 2022/4/19
 */
@ApiModel(value = "com-novel-entiy-Review")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "review")
public class Review {
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "")
    private Integer id;

    /**
     * 审核主体id
     */

    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "main_id")
    @ApiModelProperty(value = "审核主体id")
    private Long mainId;

    /**
     * 审核主体标题
     */
    @TableField(value = "main_title")
    @ApiModelProperty(value = "审核主体标题")
    private String mainTitle;

    /**
     * 审核类型(0:作者申请，1:小说创建申请)
     */
    @TableField(value = "review_type")
    @ApiModelProperty(value = "审核类型(0:作者申请，1:小说创建申请)")
    private Integer reviewType;

    /**
     * 结果(0:审核中 1:失败 2:成功)
     */
    @TableField(value = "review_result")
    @ApiModelProperty(value = "结果(0:审核中 1:失败 2:成功)")
    private Integer reviewResult;

    /**
     * 创建时间
     */
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(value = "created_time",fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date createdTime;

    /**
     * 更新时间
     */
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(value = "updated_time",fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间")
    private Date updatedTime;

    /**
     * 申请人昵称
     */
    @TableField(value = "created_user")
    @ApiModelProperty(value = "申请人昵称")
    private String createdUser;

    /**
     * 申请人邮箱
     */
    @TableField(value = "created_email")
    @ApiModelProperty(value = "申请人邮箱")
    private String createdEmail;

    /**
     * 申请人id
     */

    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "created_id")
    @ApiModelProperty(value = "申请人id")
    private Long createdId;

    /**
     * 审核人账号
     */
    @TableField(value = "review_user")
    @ApiModelProperty(value = "审核人账号")
    private String reviewUser;

    /**
     * 审核人id
     */

    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "review_id")
    @ApiModelProperty(value = "审核人id")
    private Long reviewId;

    public static final String COL_ID = "id";

    public static final String COL_MAIN_ID = "main_id";

    public static final String COL_MAIN_TITLE = "main_title";

    public static final String COL_REVIEW_TYPE = "review_type";

    public static final String COL_REVIEW_RESULT = "review_result";

    public static final String COL_CREATED_TIME = "created_time";

    public static final String COL_UPDATED_TIME = "updated_time";

    public static final String COL_CREATED_USER = "created_user";

    public static final String COL_CREATED_EMAIL = "created_email";

    public static final String COL_CREATED_ID = "created_id";

    public static final String COL_REVIEW_USER = "review_user";

    public static final String COL_REVIEW_ID = "review_id";
}